package com.csd.action.manager;
import com.csd.helper.ActionResult;
import com.csd.service.IProjectService;

/**
 * 管理员通过或驳回项目申请
 * @author sanmu
 *	<br>创建于2009-12-25
 */
public class ProjectApplyPassOrRejectAction {

	private String action;
	
	private String level;
	
	private Integer projectID;
	
	public Integer getProjectID() {
		return projectID;
	}

	public void setProjectID(Integer projectID) {
		this.projectID = projectID;
	}

	private IProjectService projectService;

	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public IProjectService getProjectService() {
		return projectService;
	}

	public void setProjectService(IProjectService projectService) {
		this.projectService = projectService;
	}
	
	public String execute()throws Exception
	{
		String text = ActionResult.fail;
		boolean bl = false;
		
		//管理员审批结果 ，通过或驳回项目申请
		bl = projectService.projectApplyPassOrReject(projectID, action, level);
		if (bl) {
			text = ActionResult.success;
		}
		return text;
	}
}
